package com.layfuture.lftserver.inventory;

import com.layfuture.lftserver.order.spi.OrderCompleted;
import lombok.extern.slf4j.Slf4j;
import org.springframework.modulith.ApplicationModuleListener;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.scheduling.annotation.Schedules;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class InventoryManagement {
    /**
     * 更新库存
     *
     * @param event
     */
    @ApplicationModuleListener
    void on(OrderCompleted event) {
        log.info("监听到数据：{}", event.getOrderId());
    }
}
